<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Hash;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class ListController extends Controller
{
	public function getList()
	{

	//关联查询
	$scenic = DB::table('scenic')
            ->join('scenic_photo', 'scenic.id', '=', 'scenic_photo.id')
            ->paginate(8);
    $scenics = DB::table('scenic')
		    ->join('scenic_photo', 'scenic.id', '=', 'scenic_photo.id')
		    ->paginate(4);
	// $scenic = DB::table('scenic')->paginate(8);
	// $scenics = DB::table('scenic')->paginate(4);
	//根据id查询图册表		
   //显示前台国内景点页面
	return view('home.list.list',['scenic'=>$scenic,'scenics'=>$scenics]);

	}

}
